package com.tul.exercise.base.clazz.base.eg1;


import org.junit.jupiter.api.Test;

import java.util.Arrays;
import java.util.List;

/**
 * @author tul
 * 《java编程思想》 14章 示例1
 *  测试 Shape类及其子类
 */
public class ShapeTest {

    @Test
    public void test() {

        List<Shape> list = Arrays.asList(new Circle(), new Square(), new Triangle());

        list.forEach(shape -> {
            shape.draw();
        });

    }
}
